'use strict';
const net = require("net"),fs = require('fs'),lAddr = "192.168.0.201",lPort = 8090; 
const loger = require("./module/loger");

process.on('uncaughtException', function(err) {
	loger.info('uncaughtException: ', err.stack);
});

// global.client = null;
global.sdObj = {};
global.sdObj.ud = ['','','','15851681034','','','','','','','1023456789'];

let sn = 0, web = require("./module/web");
// web.openUrl("http://zhushou.360.cn");
//const msg = require("./config/msgconfig");
// web.openUrl("http://www.baidu.com", (w)=>{
	// w.window.document.getElementById("kw").value = "test";
// });

const msg = require("./cmdjs/360/10");
setInterval(function()
{
	sn++;
	
	//const msg = require("./config/msgconfig.json");	
	//loger.info(JSON.stringify(msg));
	//loger.info(__dirname);
	//const msg = require(__dirname + "/config/msgconfig.json");
	//loger.info(JSON.stringify(msg));
	
	if(sn % 5 == 0){
		// if(sn % 15)
			// web.printcookie();
		// else if(sn % 10)
			//web.openUrl("http://zhushou.360.cn");
		// else
			// web.openUrl("http://www.baidu.com");
		// loger.info(JSON.stringify(process.memoryUsage()));
		
		//const r = require("./funs/3.js");
		//r.run({"json":"funs\\3.js"});
		// let robot = require("robotjs")
		// robot.moveMouse(100, 20*sn);
	}
	
	// if(sn == 5) {
		// let reg = require(__dirname + "/cmdjs/360/reg.js");
		// reg.run();
	// }
	// if(sn % 10){
		// web.exeload();
	// }
}, 1000);

// function tet(){
	// const msg = require("./config/msgconfig");
	// loger.info(JSON.stringify(msg));
// }

// tet();

//nw.Window.open("https://www.baidu.com", {width:960,height:800}, function(w){});



